var o;
avalon.ready(function(){
	o = avalon.define({
		$id:"root",
		infor:{},
		tubuy:false,
		isfocu:false,
		isfoc:false,
		isbaoben:false,
		hand:1,
		timeitem:1,
		mingxi:1,
		topen:false,
		fastfoc:false,
		buy:function(){
        	o.tubuy = true; 
        },
        topay:function(){
        	o.tubuy = false; 
        	location.href="order_list.html";
        },
        ChooseFocu:function(){
        	o.isfocu = !o.isfocu;
        },
        ChooseFoc:function(){
        	o.isfoc = !o.isfoc;
        },
        ChooseBao:function(){
        	o.isbaoben = !o.isbaoben;
        },
		switchtime:function(timId){
            o.timeitem=timId;
        },
        switchMin:function(minId){
            o.mingxi=minId;
        },
        switchhand:function(handId){
            o.hand=handId;
        },
        opentime:function(){
       		o.topen = !o.topen; 
        },
        Fastfoc:function(){
       		o.fastfoc = !o.fastfoc; 
        }
	});
	avalon.scan(document.body);
})
//加载基本信息
function loadQuery(){
    RPC.invokeApi("","",null,null,function(){
		widgetUtil.loadding("加载中...");
    },function(n){
        widgetUtil.hideWidget();
//      o.infor=n.result;
    },function(){
        widgetUtil.hideWidget();
    });
}
//加载明细列表
function loadQuery(){
    RPC.invokeApi("","",null,null,function(){
		widgetUtil.loadding("加载中...");
    },function(n){
        widgetUtil.hideWidget();
//      o.dlist=n.result;
    },function(){
        widgetUtil.hideWidget();
    });
}

